import { Enum } from "cc";

// 地图瓦片类型枚举
export enum TILE_TYPE_ENUM {
    WALL_COLUMN = 'WALL_COLUMN',
    WALL_ROW = 'WALL_ROW',
    WALL_LEFT_TOP = 'WALL_LEFT_TOP',
    WALL_LEFT_BOTTOM = 'WALL_LEFT_BOTTOM',
    WALL_RIGHT_TOP ='WALL_RIGHT_TOP',
    WALL_RIGHT_BOTTOM = 'WALL_RIGHT_BOTTOM',
    CLIFF_LEFT = 'CLIFF_LEFT',
    CLIFF_CENTER = 'CLIFF_CENTER',
    CLIFF_RIGHT ='CLIFF_RIGHT',
    FLOOR ='FLOOR',
}

// 事件枚举
export enum EVENT_ENUM{
    NEXT_LEVEL='NEXT_LEVEL',
    PLAYER_CTRL='PLAYER_CTRL',
    PLAYER_MOVE_END='PLAYER_MOVE_END',
    PLAYER_BORN='PLAYER_BORN',
    ATTACK_PLAYER='ATTACK_PLAYER',
    ATTACK_ENENY='ATTACK_ENENY',
    DoorOpen='DoorOpen',
    SHOW_SMOKE='SHOW_SMOKE',
    SCREEN_SHAKE='SCREEN_SHAKE',
    RECORD_STEP='RECORD_STEP',
    REVOKE_STEP='REVOKE_STEP',
    RESTART_LEVEL='RESTART_LEVEL',
    OUT_BATTLE='OUT_BATTLE',
}

// 控制器枚举
export enum CONTROLLER_ENUM{
    TOP='TOP',
    BOTTOM='BOTTOM',
    LEFT='LEFT',
    RIGHT='RIGHT',
    TURNLEFT='TURNLEFT',
    TURNRIGHT='TURNRIGHT'
}

//状态机参数类型
export enum FSM_PARAMS_TYPE_ENUM{
    NUMBER='NUMBER',    // 数值类型参数
    TRIGGER='TRIGGER',  // 触发器类型参数
}

//状态机参数名称
export enum PARAMS_NAME_ENUM {
    IDLE = 'IDLE',          // 空闲状态
    TURNLEFT = 'TURNLEFT',  // 左转状态
    TURNRIGHT = 'TURNRIGHT', // 右转状态
    BLOCKTURNLEFT='BLOCKTURNLEFT', // 被阻挡左转状态
    BLOCKTURNRIGHT='BLOCKTURNRIGHT', // 被阻挡右转状态
    BLOCKFRONT='BLOCKFRONT', // 前方被阻挡
    BLOCKBACK='BLOCKBACK', // 后方被阻挡
    BLOCKLEFT='BLOCKLEFT', // 左侧被阻挡
    BLOCKRIGHT='BLOCKRIGHT', // 右侧被阻挡
    DIRECTION='DIRECTION',   // 方向参数
    ATTACK='ATTACK',
    DEATH='DEATH',
    AIRDEATH='AIRDEATH',
    SPIKES_CUR_COUNT='SPIKES_CUR_COUNT',
    SPIKES_TOTAL_COUNT='SPIKES_TOTAL_COUNT',
}

//方向枚举
export enum DIRECTION_ENUM{
    TOP='TOP',
    BOTTOM='BOTTOM',
    LEFT='LEFT',
    RIGHT='RIGHT',
}

// 实体状态枚举
export enum ENTITY_STATE_ENUM{
    IDLE='IDLE',
    TURNLEFT='TURNLEFT',
    TURNRIGHT='TURNRIGHT',
    BLOCKTURNLEFT='BLOCKTURNLEFT',
    BLOCKTURNRIGHT='BLOCKTURNRIGHT',
    BLOCKFRONT='BLOCKFRONT', // 前方被阻挡
    BLOCKBACK='BLOCKBACK', // 后方被阻挡
    BLOCKLEFT='BLOCKLEFT', // 左侧被阻挡
    BLOCKRIGHT='BLOCKRIGHT', // 右侧被阻挡
    ATTACK='ATTACK',
    DEATH='DEATH',
    AIRDEATH='AIRDEATH',
}

// 方向顺序枚举（用于计算旋转后的方向）
export enum DIRECTION_ORDER_ENUM{
    TOP=0,
    RIGHT=1,
    BOTTOM=2,
    LEFT=3
}

export enum ENTITY_TYPE_ENUM{
    PLAYER='PLAYER',
    SKELETON_WOODEN='SKELETON_WOODEN',
    SKELETON_IRON='SKELETON_IRON',
    DOOR='DOOR',
    BURST='BURST',
    SPIKES_ONE='SPIKES_ONE',
    SPIKES_TWO='SPIKES_TWO',
    SPIKES_THREE='SPIKES_THREE',
    SPIKES_FOUR='SPIKES_FOUR',
    SMOKE='SMOKE'
}

export enum SPIKES_TYPE_MAP_TOTAL_COUNT_ENUM{
    SPIKES_ONE=2,
    SPIKES_TWO=3,
    SPIKES_THREE=4,
    SPIKES_FOUR=5,
}

export enum SPIKES_COUNT_ENUM{
    ZERO='ZERO',
    ONE='ONE',
    TWO='TWO',
    THREE='THREE',
    FOUR='FOUR',
    FIVE='FIVE',
}

export enum SPIKES_COUNT_MAP_NUMBER_ENUM{
    ZERO=0,
    ONE=1,
    TWO=2,
    THREE=3,
    FOUR=4,
    FIVE=5,
}

export enum SHAKE_TYPE_ENUM{
    TOP='TOP',
    BOTTOM='BOTTOM',
    LEFT='LEFT',
    RIGHT='RIGHT',
}

export enum SCENE_ENUM{
    Loading='Loading',
    Start='Start',
    Battle='Battle'
}
